<?php
$this->load->view('slider');
?>

    <!-- 3 kolom pertama -->
    <div class="container margin-top-content">
      <div class="row">
          <div class="col-sm-10 col-sm-offset-1">
            <div class="col-sm-12">
              <div class="row">
                <div class="col-sm-4 garis">
                </div>
                <div class="col-sm-4 outer-tengahnya-garis">
                  <center><a href="<?php echo site_url('all_news');?>">News & Events</a></center>
                </div>
                <div class="col-sm-4 garis">
                </div>
              </div><!-- /row -->
            </div>
            <div class="row">
			<?php
				if(isset($list_news)){
				
				foreach($list_news as $val){
					if($val['gambar']==""){
						$gambar="default.jpg";
					}else{
						$gambar=$val['gambar'];
					}
					$path_gambar=base_url()."foto_post/thumbs/".$gambar;
				
				?>
              <div class="col-sm-4">
                <div class="outer-border tiga-col-newsevent shadow">
                  <p class="img-newsevents">
                    <img src="<?php echo $path_gambar;?>" alt='<?php echo $val['judul' ]?>'>
                  </p>
                  <a href="<?php echo site_url('news/'.$val['slug'])?>"><h4><?php echo $val['judul' ]?></h4></a>
                  <p class="waktu-posting"><?php echo tgl_indonesia($val['tgl_posting']);?></p>
                  <p class="page-col small">
                    <?php
					$tmp_konten=strip_tags($val['konten']);
					$konten = word_limiter($tmp_konten, 20);
					echo $konten;
				?><a href="<?php echo site_url('news/'.$val['slug'])?>">&nbsp;selengkapnya</a>
                  </p>
                <div class="clearfix"></div>
                </div>
              </div>
			  <?php
			  }
			  }
			  ?>
            </div>
          </div>
        </div>
      </div>
    <div class="clearfix"></div>
    </div><!-- /.container -->
    <!-- end 3 kolom pertama -->

    <!-- 3 kolom kedua -->
    <div class="outer100">
      <div class="container">
        <div class="row">
          <div class="col-sm-10 col-sm-offset-1">
            <!-- start slider portofolio -->
            <div class="col-sm-12">
              <div class="row">
                <div class="col-sm-5 garis2"></div>
                <div class="col-sm-2 outer-tengahnya-garis">
                  <center><a href="<?php echo site_url('all_portofolio');?>">Portfolio</a></center>
                </div>
                <div class="col-sm-5 garis2"></div>
              </div><!-- /row -->
            </div>
            <div class="container2 demo-1">
              <div class="main">
                <!-- Elastislide Carousel -->
                <ul id="carousel" class="elastislide-list">
				<?php
				if(isset($list_portofolio)){
				
				foreach($list_portofolio as $val){
				
					if($val['gambar']==""){
						$gambar="default.jpg";
					}else{
						$gambar=$val['gambar'];
					}
					$path_gambar=base_url()."foto_portofolio/thumbs/".$gambar;
				
				
				?>
                  <li>

                    <a href="<?php echo site_url('portofolio/'.$val['slug'])?>">
                      <center><img src="<?php echo $path_gambar;?>" alt="<?php echo $val['judul'];?>" /></center>
                      <h4 class="judul-slide-portofolio"><?php echo $val['judul'];?></h4>
                    </a>
                    
                  <div class="clearfix"></div>
                  </li>
				   <?php
				  }
				  }
				  ?>
                <div class="clearfix"></div>
                </ul>
                <!-- End Elastislide Carousel -->
              <div class="clearfix"></div>
              </div>
            <div class="clearfix"></div>
            </div>
            <!-- end slider portofolio -->
          </div>
        </div>
      <div class="clearfix"></div>
      </div>
    <div class="clearfix"></div>
    </div>
    <!-- 3 kolom kedua -->

    <!-- 3 kolom ketiga -->
    <div class="outer100-2">
      <div class="container">
      <div class="row">
        <div class="col-sm-10 col-sm-offset-1">
        <div class="col-sm-12">
              <div class="row">
                <div class="col-sm-4 garis">
                </div>
                <div class="col-sm-4 outer-tengahnya-garis">
                  <center><a href="#">Our Services</a></center>
                </div>
                <div class="col-sm-4 garis">
                </div>
              </div><!-- /row -->
            </div>
          <div class="row">
		   <?php
		  if(isset($list_produk)){
			foreach($list_produk as $val){
				if($val['gambar']==""){
					$gambar="default.jpg";
				}else{
					$gambar=$val['gambar'];
				}
				$path_gambar=base_url()."foto_produk/thumbs/".$gambar;
		  ?>
            <div class="col-sm-4">
              <div class="outer-border tiga-col shadow">
                <p>
                  <img src="<?php echo $path_gambar;?>" alt="<?php echo $val['judul']?>">
                </p>
                <h4><a href="<?php echo site_url('produk/'.$val['slug'])?>" ><?php echo $val['judul']?></a></h4>
                <p class="page-col small">
                  <?php
					
					if($val['deskripsi']!=""){
						$konten=$val['deskripsi'];
					}else{
						$tmp_konten=strip_tags($val['konten']);
						$konten = word_limiter($tmp_konten, 20);
					}
					echo $konten;
				?>
                </p>
                <p>
                  <a href="<?php echo site_url('produk/'.$val['slug'])?>" class="btn btn-primary btn-sm">Read more</a>
                </p>
              <div class="clearfix"></div>
              </div>
            </div>
			<?php
				}
			}
			?>
          </div>
        <div class="clearfix"></div>
        </div>
      </div>
        
    </div>
    <!-- 3 kolom ketiga -->

    <!-- client -->
    <div class="outer-client">
      <div class="container">
        <div class="row">
          <div class="col-sm-10 col-sm-offset-1">
            <div class="outer-border">
            <?php
            //include "client.php";
			$this->load->view('client');
            ?>
            <div class="clearfix"></div>
            </div>
          </div>
        </div>
      </div>
    <div class="clearfix"></div>
    </div>
    <!-- end client -->